﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;


namespace MineDiscover.UCs
{
    public class TimeCountControl : CountControl
    {
        private Timer timer;
        public TimeCountControl()
            : base()
        {
            lblCaption.Text = "Time : ";
            lblCount.Text = "0";
            timer = new Timer();
        }

        public void BeginCount()
        {
            timer.Interval = 1000;
            timer.Tick += new EventHandler(timer_Tick);
            timer.Start();
        }

        public void timer_Tick(object sender, EventArgs e)
        {
            int time = Int32.Parse(lblCount.Text);
            lblCount.Text = time.ToString();
        }
    }
}
